package statechurn;


import primitives.graph.*;


public class MergePair {

	private Node left;
	private Node right;
	
	
	public MergePair(Node a, Node b){
		if(a.getLabel().compareTo(b.getLabel()) > 0){
			left = b;
			right = a;
		}else{
			left = a;
			right = b;
		}
	}
	
	public Node getLeft(){
		return left;
	}
	
	public Node getRight(){
		return right;
	}
		   
	public boolean equals(MergePair other){
			return 
					other.getLeft().getLabel().equals(left.getLabel()) 
				&&	other.getRight().getLabel().equals(right.getLabel());
			
	}
	
	public int hashCode(){
			String c = left.getLabel() + "+::+::+" + right.getLabel();
			return c.hashCode();
	}
	
 }